import { MciInput } from '@/components/base';

export default defineComponent({
  setup() {
    const model = ref(0.01);
    const modelMaxLength = ref('123456789');
    const formatNumLocale = ref('1000');
    const modelValue2 = ref('0');
    const testClick = () => console.log(modelValue2.value);
    return { model, modelMaxLength, formatNumLocale, modelValue2, testClick };
  },
  render() {
    return (
      <div class="ttttttt">
        <MciInput isPercent decimal={1} type="number" vModel={this.model} />
        <MciInput isPercent decimal={1} mode="view" type="number" vModel={this.model} />
        <p>modelMaxLength:{this.modelMaxLength}</p>
        <MciInput maxlength={3} vModel={this.modelMaxLength} />
        <MciInput maxlength={3} mode="view" vModel={this.modelMaxLength} />
        <p>formatNumLocale:{this.formatNumLocale}</p>
        <MciInput formatNumLocale decimal={3} type="number" vModel={this.formatNumLocale} />
        <MciInput formatNumLocale toChineseNum vModel={this.formatNumLocale} v-model:modelValue2={this.modelValue2} />
        <p onClick={this.testClick}>modelValue2：{this.modelValue2}</p>
      </div>
    );
  }
});
